using System;
using System.Collections.Generic;
using System.Text;
using JsonFx.Json;


namespace OpenFlashChart
{
    public class HBarValue
    {
        private double left;
        private double right;
        private string tip;
        private string onClick;

        public HBarValue(double left,double right)
        {
            this.Left = left;
            this.Right = right;
        }
        public HBarValue(double left, double right,string tip)
        {
            this.Left = left;
            this.Right = right;
            this.tip = tip;
        }
        public HBarValue(double left, double right, string tip, string onClick)
        {
          this.Left = left;
          this.Right = right;
          this.tip = tip;
          this.onClick = onClick;
        }

        [JsonProperty("left")]
        public double Left
        {
            get { return left; }
            set { left = value; }
        }
        [JsonProperty("right")]
        public double Right
        {
            get { return right; }
            set { right = value; }
        }
        [JsonProperty("tip")]
        public string Tip
        {
            get { return tip; }
            set { tip = value; }
        }
        [JsonProperty("on-click")]
        public string OnClick
        {
          get { return onClick; }
          set { onClick = value; }
        }
    }
    public class HBar:BarBase
    {
        public HBar()
        {
            this.ChartType = "hbar";
        }
        public void Add(HBarValue hBarValue)
        {
            this.Values.Add(hBarValue);
        }
    }
}
